package tech.wenxu.configclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhaowenxu
 * @date 2020/4/12 22:29
 */
@RefreshScope
@RestController
public class ConfigController {

    @Value("${clientParam}")
    private String clientParam;

    @GetMapping("/helloworld")
    public String helloworld() {
        return "hello world";
    }

    @GetMapping("/getClientParam")
    public String getClientParam() {
        return clientParam;
    }
}
